package com.ruoyi.web.wrapper;

import cn.hutool.core.util.ObjectUtil;
import com.ruoyi.account.enums.ActionTypeEnum;
import com.ruoyi.account.enums.ApplyStatusEnum;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.wrapper.BaseControllerWrapper;
import com.ruoyi.laiqianba.enums.AccountTypeEnum;
import com.ruoyi.laiqianba.enums.BaseStatusEnum;

import java.util.List;
import java.util.Map;

public class MemberSourceDictInfoWrapper extends BaseControllerWrapper {

    public MemberSourceDictInfoWrapper(Map<String, Object> single) {
        super(single);
    }

    public MemberSourceDictInfoWrapper(List<Map<String, Object>> multi) {
        super(multi);
    }

    @Override
    public void wrapTheMap(Map<String, Object> map) {
        try {

            //操作类型
            String status = (String) map.get("status");
            if (ObjectUtil.isNotEmpty(status)){
                map.put("statusStr", BaseStatusEnum.getNameByValue(Integer.valueOf(status)));
            }
            String taskStatus = (String) map.get("taskStatus");
            if (ObjectUtil.isNotEmpty(taskStatus)){
                map.put("taskStatusStr", BaseStatusEnum.getNameByValue(Integer.valueOf(taskStatus)));
            }
            String aptitudeStatus = (String) map.get("aptitudeStatus");
            if (ObjectUtil.isNotEmpty(taskStatus)){
                map.put("aptitudeStatusStr", BaseStatusEnum.getNameByValue(Integer.valueOf(aptitudeStatus)));
            }
        }catch (Exception ex){
            ex.printStackTrace();
        }
    }
}
